export const namespace = "stadiumPerformanceDetail";
import { Image } from "antd";

export const calcColumns = (params) => {
  const columns = [
    {
      title: "发生时间",
      dataIndex: "occurDate",
    },
    {
      title: "业绩类型",
      dataIndex: "performanceType",
      valueEnum: {
        1: { text: "课程销售" },
        2: { text: "会员卡销售" },
        3: { text: "其他" },
      },
    },
    {
      title: "业绩说明",
      dataIndex: "performanceIllustrate",
      hideInSearch: true,
    },

    {
      title: "业绩余额",
      dataIndex: "performanceMoney",
      hideInSearch: true,
    },
    {
      title: "会员昵称",
      dataIndex: "wechatUserNickName",
      hideInSearch: true,
    },
    {
      title: "手机号码",
      dataIndex: "wechatUserTel",
      hideInSearch: true,
    },
    {
      title: "来源类型",
      dataIndex: "sourceType",
      hideInSearch: true,
      valueEnum: {
        1: { text: "线上订单" },
        2: { text: "代客预约" },
        3: { text: "手工录入" },
      },
    },
    {
      title: "备注",
      dataIndex: "remark",
      hideInSearch: true,
    },
  ];
  if (params?.operate) {
    columns.push(params?.operate);
  }
  return columns;
};
